import request from '@/utils/request'
export default {
    //1 添加课程信息
    addCourseInfo(courseInfo) {
        return request({
            url: '/eduservice/edu-course/addCourseInfo',
            method: 'post',
            data:courseInfo
          })
    },
    //2 查询所有讲师
    getListTeacher() {
        return request({
            url: '/eduservice/edu-teacher/findAllTeacher',
            method: 'get'
          })
    },
    //根据课程id查询课程基本信息
    getCourseInfoId(id) {
        return request({
            url: '/eduservice/edu-course/getCourseInfo/'+id,
            method: 'get'
          })
    },
    //修改课程信息
    updateCourseInfo(courseInfo) {
        return request({
            url: '/eduservice/edu-course/updateCourseInfo',
            method: 'post',
            data: courseInfo
          })
    },
    //根据课程id查询确认信息
    getPublishCourseInfoById(id){
        return request({
            url: '/eduservice/edu-course/getCourseInfoById/'+id,
            method: 'get'
        })
    },
    //课程最终发布
    publihCourse(id) {
        return request({
            url: '/eduservice/edu-course/publishCourse/'+id,
            method: 'post'
          })
    },
    //TODO 课程列表
    //课程最终发布
    getListCourse(page,limit,courseQuery) {
        return request({
            url: '/eduservice/edu-course/getListCourse/'+page+"/"+limit,
            method: 'post',
            data: courseQuery
          })
    },

    //删除课程
    removeCourse(id){
        return request({
            url: '/eduservice/edu-course/removeCourse/'+id,
            method: 'get'
        })
    }
}
